import 'package:flutter/widgets.dart';
import 'package:apple_style_wechat/global/constants.dart' show AppColors;

class Conversation {
  Conversation({
    @required this.title,
    @required this.avator,
    @required this.createAt,
    this.desc,
    this.isMute: false,
    this.titleColor: AppColors.ConversationTitleColor,
    this.unreadMsgCount: 0,
    this.displayDot: false,
  })  : assert(avator != null),
        assert(title != null),
        assert(createAt != null);

  /// 头像
  final String avator;

  /// 标题
  final String title;

  /// 描述
  final String desc;

  /// 创建时间
  final String createAt;

  /// 是否开启免打扰
  final bool isMute;

  /// 标题颜色
  final int titleColor;

  /// 未读消息数量
  final int unreadMsgCount;

  /// 未读消息显示样式
  final bool displayDot;
}

List<Conversation> makeConversations = [
  Conversation(
    avator: 'https://randomuser.me/api/portraits/men/5.jpg',
    createAt: '17:50',
    title: 'Kevin',
    desc: 'Are you mocking me?',
  ),
  Conversation(
    avator: 'https://randomuser.me/api/portraits/men/7.jpg',
    createAt: 'Yestoday',
    title: 'Tom',
    desc: 'What fuck are you doing?',
  ),
  Conversation(
    avator: 'https://randomuser.me/api/portraits/men/31.jpg',
    createAt: '8:33',
    title: 'Jim',
    desc: 'I am so tired.',
  ),
  Conversation(
    avator: 'https://randomuser.me/api/portraits/women/66.jpg',
    createAt: '2 minutes ago',
    title: 'Jessica',
    desc: 'What are you looking for?',
  ),
  Conversation(
    avator: 'https://randomuser.me/api/portraits/women/76.jpg',
    createAt: 'Yestoday 23:48',
    title: 'Ashley',
    desc: 'I am here because I am loved by you.',
  ),
  Conversation(
    avator: 'https://randomuser.me/api/portraits/women/64.jpg',
    createAt: 'Sunday',
    title: 'Lucy',
    desc: 'I am boring now, can you talking with me a moment?',
  ),
  Conversation(
    avator: 'https://randomuser.me/api/portraits/men/79.jpg',
    createAt: 'Saturday',
    title: 'Robert',
    desc: 'I will be on the plane right away?',
  ),
  Conversation(
    avator: 'https://randomuser.me/api/portraits/men/29.jpg',
    createAt: 'Monday',
    title: 'Daniel',
    desc: '我可以讲一点点中文。',
  ),
  Conversation(
    avator: 'https://randomuser.me/api/portraits/men/61.jpg',
    createAt: '1 hour ago',
    title: 'Hugh',
    desc: 'I am come back?',
  ),
  Conversation(
    avator: 'https://pic2.zhimg.com/80/v2-ebb2922cbccf391c20b8224678cafa43_qhd.jpg',
    createAt: 'All the time',
    title: 'Tim Cook',
    desc: "Do you want to buy Apple's new products this year?",
  ),
];
